Optimal. Leaf size=150 \[ \frac{x \left (x^2 (-(5 d+8 f+20 h))+17 d+20 f+32 h\right )}{72 \left (x^4-5 x^2+4\right )}+\frac{1}{432} \tanh ^{-1}\left (\frac{x}{2}\right ) (19 d+52 f+112 h)-\frac{1}{54} \tanh ^{-1}(x) (d+7 f+13 h)+\frac{x^2 (-(2 e+5 g))+5 e+8 g}{18 \left (x^4-5 x^2+4\right )}+\frac{1}{54} (2 e+5 g) \log \left (1-x^2\right )-\frac{1}{54} (2 e+5 g) \log \left (4-x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.214297, antiderivative size = 150, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 8, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.242, Rules used = {1673, 1678, 1166, 207, 1247, 638, 616, 31} \[ \frac{x \left (x^2 (-(5 d+8 f+20 h))+17 d+20 f+32 h\right )}{72 \left (x^4-5 x^2+4\right )}+\frac{1}{432} \tanh ^{-1}\left (\frac{x}{2}\right ) (19 d+52 f+112 h)-\frac{1}{54} \tanh ^{-1}(x) (d+7 f+13 h)+\frac{x^2 (-(2 e+5 g))+5 e+8 g}{18 \left (x^4-5 x^2+4\right )}+\frac{1}{54} (2 e+5 g) \log \left (1-x^2\right )-\frac{1}{54} (2 e+5 g) \log \left (4-x^2\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1673
Rule 1678
Rule 1166
Rule 207
Rule 1247
Rule 638
Rule 616
Rule 31
Rubi steps
\begin{align*} \int \frac{d+e x+f x^2+g x^3+h x^4}{\left (4-5 x^2+x^4\right )^2} \, dx &=\int \frac{x \left (e+g x^2\right )}{\left (4-5 x^2+x^4\right )^2} \, dx+\int \frac{d+f x^2+h x^4}{\left (4-5 x^2+x^4\right )^2} \, dx\\ &=\frac{x \left (17 d+20 f+32 h-(5 d+8 f+20 h) x^2\right )}{72 \left (4-5 x^2+x^4\right )}-\frac{1}{72} \int \frac{-d+20 f+32 h+(5 d+8 f+20 h) x^2}{4-5 x^2+x^4} \, dx+\frac{1}{2} \operatorname{Subst}\left (\int \frac{e+g x}{\left (4-5 x+x^2\right )^2} \, dx,x,x^2\right )\\ &=\frac{5 e+8 g-(2 e+5 g) x^2}{18 \left (4-5 x^2+x^4\right )}+\frac{x \left (17 d+20 f+32 h-(5 d+8 f+20 h) x^2\right )}{72 \left (4-5 x^2+x^4\right )}+\frac{1}{18} (-2 e-5 g) \operatorname{Subst}\left (\int \frac{1}{4-5 x+x^2} \, dx,x,x^2\right )-\frac{1}{54} (-d-7 f-13 h) \int \frac{1}{-1+x^2} \, dx-\frac{1}{216} (19 d+52 f+112 h) \int \frac{1}{-4+x^2} \, dx\\ &=\frac{5 e+8 g-(2 e+5 g) x^2}{18 \left (4-5 x^2+x^4\right )}+\frac{x \left (17 d+20 f+32 h-(5 d+8 f+20 h) x^2\right )}{72 \left (4-5 x^2+x^4\right )}+\frac{1}{432} (19 d+52 f+112 h) \tanh ^{-1}\left (\frac{x}{2}\right )-\frac{1}{54} (d+7 f+13 h) \tanh ^{-1}(x)+\frac{1}{54} (-2 e-5 g) \operatorname{Subst}\left (\int \frac{1}{-4+x} \, dx,x,x^2\right )+\frac{1}{54} (2 e+5 g) \operatorname{Subst}\left (\int \frac{1}{-1+x} \, dx,x,x^2\right )\\ &=\frac{5 e+8 g-(2 e+5 g) x^2}{18 \left (4-5 x^2+x^4\right )}+\frac{x \left (17 d+20 f+32 h-(5 d+8 f+20 h) x^2\right )}{72 \left (4-5 x^2+x^4\right )}+\frac{1}{432} (19 d+52 f+112 h) \tanh ^{-1}\left (\frac{x}{2}\right )-\frac{1}{54} (d+7 f+13 h) \tanh ^{-1}(x)+\frac{1}{54} (2 e+5 g) \log \left (1-x^2\right )-\frac{1}{54} (2 e+5 g) \log \left (4-x^2\right )\\ \end{align*}
Mathematica [A] time = 0.0770761, size = 159, normalized size = 1.06 \[ \frac{1}{864} \left (-\frac{12 \left (x \left (d \left (5 x^2-17\right )+4 f \left (2 x^2-5\right )+4 h \left (5 x^2-8\right )\right )+4 e \left (2 x^2-5\right )+4 g \left (5 x^2-8\right )\right )}{x^4-5 x^2+4}+8 \log (1-x) (d+4 e+7 f+10 g+13 h)-\log (2-x) (19 d+32 e+52 f+80 g+112 h)-8 \log (x+1) (d-4 e+7 f-10 g+13 h)+\log (x+2) (19 d-32 e+52 f-80 g+112 h)\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.019, size = 302, normalized size = 2. \begin{align*}{\frac{19\,\ln \left ( 2+x \right ) d}{864}}-{\frac{\ln \left ( 2+x \right ) e}{27}}-{\frac{\ln \left ( 1+x \right ) d}{108}}+{\frac{\ln \left ( 1+x \right ) e}{27}}-{\frac{19\,\ln \left ( x-2 \right ) d}{864}}-{\frac{\ln \left ( x-2 \right ) e}{27}}+{\frac{\ln \left ( x-1 \right ) d}{108}}+{\frac{\ln \left ( x-1 \right ) e}{27}}-{\frac{h}{9\,x-18}}-{\frac{h}{36\,x-36}}-{\frac{h}{36+36\,x}}-{\frac{h}{18+9\,x}}+{\frac{g}{36+18\,x}}-{\frac{d}{36+36\,x}}+{\frac{e}{36+36\,x}}-{\frac{g}{18\,x-36}}-{\frac{d}{144\,x-288}}-{\frac{e}{72\,x-144}}-{\frac{g}{36\,x-36}}-{\frac{d}{36\,x-36}}-{\frac{e}{36\,x-36}}-{\frac{d}{288+144\,x}}+{\frac{e}{144+72\,x}}+{\frac{g}{36+36\,x}}-{\frac{f}{36+36\,x}}-{\frac{f}{36\,x-72}}-{\frac{f}{36\,x-36}}-{\frac{f}{72+36\,x}}-{\frac{5\,\ln \left ( 2+x \right ) g}{54}}+{\frac{5\,\ln \left ( 1+x \right ) g}{54}}-{\frac{5\,\ln \left ( x-2 \right ) g}{54}}+{\frac{5\,\ln \left ( x-1 \right ) g}{54}}+{\frac{7\,\ln \left ( 2+x \right ) h}{54}}-{\frac{13\,\ln \left ( 1+x \right ) h}{108}}-{\frac{7\,\ln \left ( x-2 \right ) h}{54}}+{\frac{13\,\ln \left ( x-1 \right ) h}{108}}-{\frac{13\,\ln \left ( x-2 \right ) f}{216}}+{\frac{7\,\ln \left ( x-1 \right ) f}{108}}+{\frac{13\,\ln \left ( 2+x \right ) f}{216}}-{\frac{7\,\ln \left ( 1+x \right ) f}{108}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.972301, size = 196, normalized size = 1.31 \begin{align*} \frac{1}{864} \,{\left (19 \, d - 32 \, e + 52 \, f - 80 \, g + 112 \, h\right )} \log \left (x + 2\right ) - \frac{1}{108} \,{\left (d - 4 \, e + 7 \, f - 10 \, g + 13 \, h\right )} \log \left (x + 1\right ) + \frac{1}{108} \,{\left (d + 4 \, e + 7 \, f + 10 \, g + 13 \, h\right )} \log \left (x - 1\right ) - \frac{1}{864} \,{\left (19 \, d + 32 \, e + 52 \, f + 80 \, g + 112 \, h\right )} \log \left (x - 2\right ) - \frac{{\left (5 \, d + 8 \, f + 20 \, h\right )} x^{3} + 4 \,{\left (2 \, e + 5 \, g\right )} x^{2} -{\left (17 \, d + 20 \, f + 32 \, h\right )} x - 20 \, e - 32 \, g}{72 \,{\left (x^{4} - 5 \, x^{2} + 4\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 13.6627, size = 865, normalized size = 5.77 \begin{align*} -\frac{12 \,{\left (5 \, d + 8 \, f + 20 \, h\right )} x^{3} + 48 \,{\left (2 \, e + 5 \, g\right )} x^{2} - 12 \,{\left (17 \, d + 20 \, f + 32 \, h\right )} x -{\left ({\left (19 \, d - 32 \, e + 52 \, f - 80 \, g + 112 \, h\right )} x^{4} - 5 \,{\left (19 \, d - 32 \, e + 52 \, f - 80 \, g + 112 \, h\right )} x^{2} + 76 \, d - 128 \, e + 208 \, f - 320 \, g + 448 \, h\right )} \log \left (x + 2\right ) + 8 \,{\left ({\left (d - 4 \, e + 7 \, f - 10 \, g + 13 \, h\right )} x^{4} - 5 \,{\left (d - 4 \, e + 7 \, f - 10 \, g + 13 \, h\right )} x^{2} + 4 \, d - 16 \, e + 28 \, f - 40 \, g + 52 \, h\right )} \log \left (x + 1\right ) - 8 \,{\left ({\left (d + 4 \, e + 7 \, f + 10 \, g + 13 \, h\right )} x^{4} - 5 \,{\left (d + 4 \, e + 7 \, f + 10 \, g + 13 \, h\right )} x^{2} + 4 \, d + 16 \, e + 28 \, f + 40 \, g + 52 \, h\right )} \log \left (x - 1\right ) +{\left ({\left (19 \, d + 32 \, e + 52 \, f + 80 \, g + 112 \, h\right )} x^{4} - 5 \,{\left (19 \, d + 32 \, e + 52 \, f + 80 \, g + 112 \, h\right )} x^{2} + 76 \, d + 128 \, e + 208 \, f + 320 \, g + 448 \, h\right )} \log \left (x - 2\right ) - 240 \, e - 384 \, g}{864 \,{\left (x^{4} - 5 \, x^{2} + 4\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.11335, size = 213, normalized size = 1.42 \begin{align*} \frac{1}{864} \,{\left (19 \, d + 52 \, f - 80 \, g + 112 \, h - 32 \, e\right )} \log \left ({\left | x + 2 \right |}\right ) - \frac{1}{108} \,{\left (d + 7 \, f - 10 \, g + 13 \, h - 4 \, e\right )} \log \left ({\left | x + 1 \right |}\right ) + \frac{1}{108} \,{\left (d + 7 \, f + 10 \, g + 13 \, h + 4 \, e\right )} \log \left ({\left | x - 1 \right |}\right ) - \frac{1}{864} \,{\left (19 \, d + 52 \, f + 80 \, g + 112 \, h + 32 \, e\right )} \log \left ({\left | x - 2 \right |}\right ) - \frac{5 \, d x^{3} + 8 \, f x^{3} + 20 \, h x^{3} + 20 \, g x^{2} + 8 \, x^{2} e - 17 \, d x - 20 \, f x - 32 \, h x - 32 \, g - 20 \, e}{72 \,{\left (x^{4} - 5 \, x^{2} + 4\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]